home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 17 / AMIGAplus Sonderheft 17 (1999)(ICP)(DE)[!].iso / Rexx / _2_open_mailpacket.rexx < prev    next >
OS/2 REXX Batch file  |  1998-02-17  |  1KB  |  53 lines

  1. /* YAMandPGP V1.0 -- Roberto Ragusa 1997 */
  2. /* open mailpacket */
  3.  
  4. windowfilename = 'CON:50/50/600/200/YAM-REXX/CLOSE'
  5.  
  6. pgppath    = 'pgp'
  7.  
  8. tempfile   = 't:yammacrotempfile'
  9.  
  10. CALL CLOSE 'STDOUT'
  11. CALL CLOSE 'STDIN'
  12. CALL OPEN 'STDIN',windowfilename
  13. CALL PRAGMA '*','STDIN'
  14. CALL OPEN 'STDOUT','*'
  15.  
  16. options results
  17.  
  18. address COMMAND
  19.  
  20. call pragma('D','MAILPACKETS:')
  21.  
  22. 'delete >nil: oldmessage/#? all force'
  23.  
  24. call pragma('D','oldmessage')
  25. 'assign MW: ""'
  26.  
  27. address YAM
  28.  
  29. 'GetMailInfo filename'
  30. fname=result
  31.  
  32. address command
  33.  
  34. 'munpack' fname '-C MW:'
  35.  
  36. 'list >'||tempfile 'p #?(.asc)|(.pgp) lformat "'||pgppath '%n"'
  37. 'execute' tempfile
  38.  
  39. 'echo >'||tempfile '""'
  40. 'list >>'||tempfile 'p #?.lzx lformat "makedir %n_*Ncd %n_*Nlzx -x -a x /%n*Ncd /*N"'
  41. 'list >>'||tempfile 'p #?(.lha)|(.lzh) lformat "makedir %n_*Ncd %n_*Nlha x -a -M /%n*Ncd /*N"'
  42. 'list >>'||tempfile 'p #?.zip lformat "makedir %n_*Ncd %n_*Nunzip x /%n*Ncd /*N"'
  43. 'list >>'||tempfile 'p #?(.tar.(gz|gzip))|(.tgz) lformat "makedir %n_*Ncd %n_*Nuntgz /%n*Ncd /*N"'
  44. 'execute' tempfile
  45.  
  46. 'delete >nil:' tempfile
  47.  
  48. address YAM
  49.  
  50. 'Request "Read your mail in Mold:" "OK"'
  51.  
  52. 'assign MW:'
  53.